﻿using System;
using System.ComponentModel.DataAnnotations.Schema;
using Volo.Abp.Domain.Entities;

namespace HCMS.Entities.Manage
{
    /// <summary>
    /// 管理员 登录 日志
    /// </summary>
    [Table("admin_login_logs")]
    public class AdminLoginLogs : Entity<int>
    {
        /// <summary>
        /// Id
        /// </summary>
        public new int Id { get; set; }

        /// <summary>
        /// 创建 时间
        /// </summary>
        [Column("create_time")]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 管理员 Id
        /// </summary>
        [Column("admin_id")]
        public int AdminId { get; set; }

        /// <summary>
        /// 是否登录成功
        /// </summary>
        [Column("is_success")]
        public bool IsSuccess { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        [Column("message")]
        public string Message { get; set; } = "";

        /// <summary>
        /// 上一个链接
        /// </summary>
        [Column("referer_url")]
        public string RefererUrl { get; set; } = "";

        /// <summary>
        /// 当前链接
        /// </summary>
        [Column("url")]
        public string Url { get; set; } = "";

        /// <summary>
        /// 登录 IP
        /// </summary>
        [Column("ip")]
        public string Ip { get; set; } = "";

        /// <summary>
        /// 登录 浏览器
        /// </summary>
        [Column("brower")]
        public string Brower { get; set; } = "";
    }
}
